<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<h:panelGroup rendered="#{mProperty_Search.selectedProType == 'r4r'}">
<br/><br/>
	<article> <header>

	<h2>Searching Room For Rent </h2>
	</header>
	<div class="content">
		
		<h:form>
		   <table width="100%" cellspacing="5" cellpadding="0" border="0"
				class="table_box">
				<tbody>
				<tr>
				<td align="right" width="100px">Title:</td>
				<td><h:inputText value="#{mProperty_Search.title}"
						id="prop_title2" />
					<div class="table_td_message">
						<rich:message for="prop_title2" />
					</div></td>
					<td></td>
				</tr>
					<tr>
						<td align="right" width="200px">Address:</td>
						<td><h:inputText value="#{mProperty_Search.address}" id="prop_address2"/>
						<div class="table_td_message">
						<rich:message for="prop_address2" />
					</div>
						</td>
						<td></td>
					</tr>
					<tr>
						<td align="right" width="200px">Deposit:</td>
						<td><h:selectOneMenu  value="#{mProperty_Search.fromPrice}" id="prop_depositMin2">
						<f:selectItem itemValue="0" itemLabel="------------------------From-----------------------" />
						<f:selectItem itemValue="1" itemLabel="0" />
						<f:selectItem itemValue="500000" itemLabel="500.000" />
								<f:selectItem itemValue="1000000"
									itemLabel="1.000.000" />				
								<f:selectItem itemValue="1500000"
									itemLabel="1.500.000" />
								<f:selectItem itemValue="2000000"
									itemLabel="2.000.000" />
								<f:selectItem itemValue="2500000"
									itemLabel="2.500.000" />
								<f:selectItem itemValue="3000000"
									itemLabel="3.000.000" />
									<f:selectItem itemValue="3500000"
									itemLabel="3.500.000" />
									<f:selectItem itemValue="4000000"
									itemLabel="4.000.000" />
									<f:selectItem itemValue="4500000"
									itemLabel="4.500.000" />
									<f:selectItem itemValue="5000000"
									itemLabel="5.000.000" />
							</h:selectOneMenu><div class="table_td_message">
						<rich:message for="prop_depositMin2" />
					</div></td>

<td><h:selectOneMenu  value="#{mProperty_Search.toPrice}" id="prop_depositMax2">
						<f:selectItem itemValue="0" itemLabel="-------------------------To------------------------" />
						<f:selectItem itemValue="1" itemLabel="0" />
								<f:selectItem itemValue="500000" itemLabel="500.000" />
								<f:selectItem itemValue="1000000"
									itemLabel="1.000.000" />
								<f:selectItem itemValue="1500000"
									itemLabel="1.500.000" />
								<f:selectItem itemValue="2000000"
									itemLabel="2.000.000" />
								<f:selectItem itemValue="2500000"
									itemLabel="2.500.000" />
								<f:selectItem itemValue="3000000"
									itemLabel="3.000.000" />
									<f:selectItem itemValue="3500000"
									itemLabel="3.500.000" />
									<f:selectItem itemValue="4000000"
									itemLabel="4.000.000" />
									<f:selectItem itemValue="4500000"
									itemLabel="4.500.000" />
									<f:selectItem itemValue="5000000"
									itemLabel="5.000.000" />
								<f:selectItem itemValue="6000000.0" itemLabel="Over 5.000.000" />
							</h:selectOneMenu><div class="table_td_message">
						<rich:message for="prop_depositMax2" />
					</div></td>
					</tr>
					<tr>
						<td align="right">Rent Price:</td>
						<td><h:selectOneMenu  value="#{mProperty_Search.rentpriceFrom}" id="prop_rentMin1" style="align:center">
						<f:selectItem itemValue="0" itemLabel="------------------------From-----------------------" />
						<f:selectItem itemValue="1" itemLabel="0" />
								<f:selectItem itemValue="100000" itemLabel="100.000" />
								<f:selectItem itemValue="200000"
									itemLabel="200.000" />
								<f:selectItem itemValue="300000"
									itemLabel="300.000" />
								<f:selectItem itemValue="400000"
									itemLabel="400.000" />
								<f:selectItem itemValue="500000"
									itemLabel="500.000" />
								<f:selectItem itemValue="600000"
									itemLabel="600.000" />
									<f:selectItem itemValue="700000"
									itemLabel="700.000" />
									<f:selectItem itemValue="800000"
									itemLabel="800.000" />
									<f:selectItem itemValue="900000"
									itemLabel="900.000" />
									<f:selectItem itemValue="1000000"
									itemLabel="1.0000.00" />
							</h:selectOneMenu><div class="table_td_message">
						<rich:message for="prop_rentMin1" />
					</div></td>
					<td><h:selectOneMenu  value="#{mProperty_Search.rentpriceTo}" id="prop_rentMax1" style="align:center">
						<f:selectItem itemValue="0" itemLabel="-------------------------To------------------------" />
						<f:selectItem itemValue="1" itemLabel="0" />
								<f:selectItem itemValue="100000" itemLabel="100.000" />
								<f:selectItem itemValue="200000"
									itemLabel="200.000" />
								<f:selectItem itemValue="300000"
									itemLabel="300.000" />
								<f:selectItem itemValue="400000"
									itemLabel="400.000" />
								<f:selectItem itemValue="500000"
									itemLabel="500.000" />
								<f:selectItem itemValue="600000"
									itemLabel="600.000" />
									<f:selectItem itemValue="700000"
									itemLabel="700.000" />
									<f:selectItem itemValue="800000"
									itemLabel="800.000" />
									<f:selectItem itemValue="900000"
									itemLabel="900.000" />
									<f:selectItem itemValue="1000000"
									itemLabel="1.000.000" />
								<f:selectItem itemValue="1100000.0" itemLabel="Over 1.000.000" />
							</h:selectOneMenu><div class="table_td_message">
						<rich:message for="prop_rentMax1" />
					</div></td>
					</tr>
					</tbody></table>
					</h:form>
					<h:commandLink
						action="#{mProperty_Search.searchRoomForRentMethod()}" styleClass="button"
						value="Search" ></h:commandLink>
					
		
	</div>
		
	</article>
	
	<h:panelGroup rendered="#{!mProperty_Search.nullCheck}">
	<h3>Search Result</h3>
	<h:panelGroup rendered="#{!mProperty_Search.checkSize2}">
	<h:outputText value="No record found" />
	</h:panelGroup>
	<h:form>
	<ui:repeat var="items"
		value="#{mProperty_Search.searchRoomForRent}">
		<h:panelGroup rendered="#{items.property.status=='true'}">
	<article> 
		<div class="container_24">
			<div class="grid_16 alpha">
				<div class="box2">
					<h3>#{items.property.title}</h3>
					<div class="image_box">
						<p:graphicImage value="#{mProperty_Search.getPath(items.property.propID)}" width="150px" height="150px"/>
					</div>
					<div class="prop_info">
						<ul class="list1">
							<li><strong>Post Date: </strong> #{items.property.postDate}</li>
							<li><strong>Seller: </strong> #{items.property.account.name}</li>				
							<li><strong>State: </strong> #{items.property.state}</li>				
							<li><strong>Address: </strong>#{items.property.address}</li>
							<li><strong>Deposit: </strong> #{items.deposit}</li>
							<li><strong>Rent Price: </strong>#{items.rent}</li>
						</ul>
						<span class="details_link"><a href="property_details.jsf?pid=#{items.property.propID}">Details</a>
						</span>
					</div>
				</div>
			</div>

		</div>

		<input type="hidden" name="identifier" value="Home" />
	 </article>
	 </h:panelGroup>
</ui:repeat>
	<h:panelGroup rendered="#{mProperty_Search.checkSize2}">
	<h:commandLink value="&lt; prev" action="#{mProperty_Search.paginator.prev}"/>
        <h:outputText value="#{mProperty_Search.paginator.pageIndex} / #{mProperty_Search.paginator.pages}"/>
        <h:commandLink value="next &gt;" action="#{mProperty_Search.paginator.next}"/>
        <h:inputHidden value="#{mProperty_Search.paginator.pageIndex}"/>
	</h:panelGroup>

</h:form>
</h:panelGroup>
</h:panelGroup>
</html>